<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>
        爱家-我的房源
    </title>
    <link href="/static/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/static/css/reset.css" rel="stylesheet">
    <link href="/static/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">
    <link href="/static/css/ihome/main.css" rel="stylesheet">
    <link href="/static/css/ihome/myhouse.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <span id="auth_status" hidden="hidden">current_user.id_card</span>
    <div class="top-bar">
        <div class="nav-bar">
            <h3 class="page-title">我的房源</h3>
            <a class="nav-btn fl" href="{{ url_for('users.my_info') }}"><span><i
                            class="fa fa-angle-left fa-2x"></i></span></a>
        </div>
    </div>
    <div class="houses-con">
        <ul class="houses-list auth-warn" id="auth_warn">
            <li>
                <div class="house-title">
                    <h3>尚未进行实名认证，无法发布房屋信息！</h3>
                </div>
                <div class="house-content">
                    <a href="{{ url_for('users.render_auth') }}" class="btn btn-success">去实名认证</a>
                </div>
            </li>
        </ul>
        <ul id="houses-list" class="houses-list">
            <li>
                <div class="new-house">
                    <a href="{{ url_for('house.render_new_house') }}">发布新房源</a>
                </div>
            </li>
            {% for h in house %}
            <li>
                <a href="/house/render_detail/{{ h.id }}">
                    <div class="house-title">
                        <h3>{{ h.title }}</h3>
                    </div>
                    <div class="house-content">
                        <img src="{{ h.image }}">
                        <div class="house-text">
                            <ul>
                                <li>位于：{{ h.address }}</li>
                                <li>价格：￥{{ h.price }}/晚</li>
                                <li>发布时间：{{ h.create_time }}</li>
                            </ul>
                        </div>
                    </div>
                </a>
            </li>
            {% endfor %}
        </ul>
    </div>
</div>
<div class="footer">
    <p><span><i class="fa fa-copyright"></i></span>爱家租房&nbsp;&nbsp;享受家的温馨</p>
</div>
</body>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="/static/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="/static/js/template.js"></script>
<script src="/static/js/ihome/myhouse.js"></script>
</html>